﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WEB_MechSysWeb.Paginas_Publico
{
    public partial class MasterPagePublic : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            HyperLinkRoles.Visible = false;
            if (Roles.IsUserInRole("Cliente"))
            {
                HyperLinkRoles.Text = "Perfil";
                HyperLinkRoles.NavigateUrl = "~/Paginas_Logado/ClientePerfil.aspx";
                HyperLinkRoles.Visible = true;
            }
            else if (Roles.IsUserInRole("Administrador"))
            {
                HyperLinkRoles.Text = "Administração";
                HyperLinkRoles.NavigateUrl = "~/Paginas_Administrador/PaginaPrincipalAdm.aspx";
                HyperLinkRoles.Visible = true;
            }
        }
    }
}